package com.lasertd.model;

import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;

public class Field {

	private static final float SIZE = 1f;
	
	private boolean buildable = true;
	private boolean passable = false;
	private boolean isStart = false;
	private boolean isEnd = false;
	
	private Vector2 pos = new Vector2();
	private Rectangle bounds = new Rectangle();

	/**
	 * 
	 * @param pos position in Area
	 * @param buildable the Player is able to place a tower on this field
	 * @param passable the Enemies are able to pass this field (part of Enemy path).
	 */
	public Field(Vector2 pos, boolean buildable, boolean passable) {
		
		this.bounds.width = Field.SIZE;
		this.bounds.height = Field.SIZE;
		
		this.setPos(pos);
		
		this.setBuildable(buildable);
		this.setPassable(passable);
	}
	
	public Rectangle getBounds() {
		return this.bounds;
	}
	
	public boolean isBuildable() {
		return buildable;
	}

	public void setBuildable(boolean isBuildable) {
		this.buildable = isBuildable;
	}

	public Vector2 getPos() {
		return pos;
	}

	public void setPos(Vector2 pos) {
		this.pos = pos;
	}

	public boolean isPassable() {
		return passable;
	}

	public void setPassable(boolean passable) {
		this.passable = passable;
	}

	public boolean isStart() {
		return isStart;
	}

	public void setStart(boolean isStart) {
		this.isStart = isStart;
	}

	public boolean isEnd() {
		return isEnd;
	}

	public void setEnd(boolean isEnd) {
		this.isEnd = isEnd;
	}
}
